/* ======================================================
   ENHANCED SECURE TOKEN GENERATOR - PREMIUM EDITION
   ====================================================== */
.token-card-content {
  max-width: 100%;
  margin: 0 auto;
  padding: 35px;
  background: linear-gradient(145deg, var(--card-bg) 0%, var(--secondary-bg) 100%);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  color: var(--text-color);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.token-card-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-blue), var(--accent-purple));
  background-size: 200% 100%;
  animation: gradientShift 3s ease infinite;
}

@keyframes tokenGradientShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.token-card-content h1 {
  color: var(--text-primary);
  font-size: 2rem;
  margin-bottom: 8px;
  text-align: center;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.token-intro {
  text-align: center;
  color: #8b92a8;
  font-size: 0.95rem;
  margin-bottom: 30px;
  line-height: 1.6;
  font-weight: 400;
}

/* Main Layout */
.token-main-layout {
  display: flex;
  gap: 30px;
}

.token-settings-column {
  flex: 1;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.token-output-column {
  flex: 2;
  min-width: 400px;
  min-height: 500px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Settings Panel */
.token-settings {
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: rgba(255, 255, 255, 0.05);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid rgba(45, 55, 72, 0.5);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.token-settings:hover {
  border-color: rgba(147, 51, 234, 0.5);
  box-shadow: 0 0 20px rgba(147, 51, 234, 0.1);
}

.token-settings > div {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.token-settings label {
  font-weight: 600;
  color: #ffffff;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
}

.token-settings input[type="text"],
.token-settings select {
  width: 100%;
  padding: 12px;
  border: 2px solid #5b21b6;
  border-radius: 10px;
  background: #1a1d2e;
  color: #d1d5db;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  box-sizing: border-box;
}

.token-settings select {
  cursor: pointer;
}

.token-settings input[type="text"]:focus,
.token-settings select:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 20px rgba(147, 51, 234, 0.3);
}

.token-settings input[type="text"]:hover,
.token-settings select:hover {
  border-color: #7c3aed;
}

/* Button Groups */
.token-length-buttons,
.token-count-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.token-length-btn,
.token-count-btn {
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(45, 55, 72, 0.5);
  border-radius: 8px;
  color: #8b92a8;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.token-length-btn::before,
.token-count-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(147, 51, 234, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.4s, height 0.4s;
}

.token-length-btn:hover::before,
.token-count-btn:hover::before {
  width: 200px;
  height: 200px;
}

.token-length-btn:hover,
.token-count-btn:hover {
  border-color: #3b82f6;
  color: #ffffff;
  transform: translateY(-1px);
}

.token-length-btn.active,
.token-count-btn.active {
  background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
  border-color: #9333ea;
  color: white;
  box-shadow: 0 4px 15px rgba(147, 51, 234, 0.4);
  transform: translateY(0);
}

.token-length-btn.active:hover,
.token-count-btn.active:hover {
  box-shadow: 0 6px 20px rgba(147, 51, 234, 0.6);
}

/* Action Buttons */
.token-generator-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.token-actions-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
  align-items: center;
}

.token-btn-primary,
.token-btn-secondary,
.token-btn-reset {
  padding: 14px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.token-btn-primary::before,
.token-btn-secondary::before,
.token-btn-reset::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
  pointer-events: none;
}

.token-btn-primary:hover:not(:disabled)::before,
.token-btn-secondary:hover:not(:disabled)::before,
.token-btn-reset:hover::before {
  width: 450px;
  height: 450px;
}

.token-btn-primary {
  background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(147, 51, 234, 0.4);
}

.token-btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(147, 51, 234, 0.6);
}

.token-btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.token-btn-primary:disabled {
  background: rgba(45, 55, 72, 0.5);
  color: #6b7280;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  opacity: 0.5;
}

.token-btn-secondary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.token-btn-secondary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

.token-btn-secondary:active:not(:disabled) {
  transform: translateY(0);
}

.token-btn-secondary:disabled {
  background: rgba(45, 55, 72, 0.5);
  color: #6b7280;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  opacity: 0.5;
}

.token-btn-reset {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.token-btn-reset:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.6);
}

.token-btn-reset:active {
  transform: translateY(0);
}

/* Token Output Container */
.token-output {
  background: radial-gradient(circle at top left, rgba(147, 51, 234, 0.05) 0%, rgba(0, 0, 0, 0.3) 100%);
  border: 2px solid rgba(45, 55, 72, 0.5);
  border-radius: 12px;
  padding: 24px;
  font-family: "Roboto Mono", "Courier New", monospace;
  font-size: 0.9rem;
  font-weight: 700;
  color: #e8e8e8;
  overflow-y: auto;
  max-height: 560px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
  letter-spacing: 1.5px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.token-output:hover {
  border-color: #9333ea;
  box-shadow: 
    inset 0 2px 8px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(147, 51, 234, 0.2);
}

/* Custom Scrollbar */
.token-output::-webkit-scrollbar {
  width: 8px;
}

.token-output::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}

.token-output::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
  border-radius: 10px;
}

.token-output::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
}

/* Token Items */
.token-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(45, 55, 72, 0.5);
  word-break: break-all;
  transition: all 0.2s ease;
}

.token-item:hover {
  background: rgba(0, 0, 0, 0.3);
  border-color: rgba(59, 130, 246, 0.5);
  transform: translateX(2px);
}

.token-value {
  flex-grow: 1;
  text-align: left;
  color: #3b82f6;
  font-weight: 700;
}

.token-copy-single-btn {
  flex-shrink: 0;
  padding: 8px 14px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.token-copy-single-btn:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.5);
}

.token-copy-single-btn:active {
  transform: translateY(0);
}

.token-placeholder {
  color: #6b7280;
  text-align: center;
  font-size: 1rem;
  font-weight: 500;
  padding: 40px 20px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  border: 2px dashed rgba(45, 55, 72, 0.5);
}

/* Entropy Display */
.token-entropy {
  text-align: center;
  color: #8b92a8;
  font-size: 0.95rem;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  font-weight: 600;
  border: 1px solid rgba(45, 55, 72, 0.3);
  letter-spacing: 0.5px;
}

/* Feedback Message */
.token-feedback-message {
  text-align: center;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  padding: 12px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.token-feedback-message.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .token-main-layout {
    flex-direction: column;
    gap: 20px;
  }
  .token-settings-column,
  .token-output-column {
    flex: none;
    min-width: unset;
  }

  .token-output {
    max-height: 300px;
  }
}

@media (max-width: 768px) {
  .token-card-content {
    padding: 20px 12px;
    border-radius: 16px;
    margin: 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .token-card-content * {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .token-card-content h1 {
    font-size: 1.5rem;
    margin-bottom: 8px;
  }

  .token-intro {
    font-size: 0.88rem;
    margin-bottom: 20px;
  }

  .token-settings {
    gap: 15px;
    padding: 16px;
  }

  .token-settings input[type="text"],
  .token-settings select {
    font-size: 0.9rem;
    padding: 10px 12px;
  }

  .token-length-buttons,
  .token-count-buttons {
    justify-content: center;
  }

  .token-generator-box {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .token-actions-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .token-btn-primary,
  .token-btn-secondary {
    padding: 12px 16px;
    font-size: 0.9rem;
  }

  .token-output {
    font-size: 0.85rem;
    padding: 18px;
    letter-spacing: 1px;
    min-height: 60px;
    max-height: 250px;
  }

  .token-item {
    gap: 8px;
    padding: 10px;
  }

  .token-copy-single-btn {
    font-size: 0.8rem;
    padding: 7px 10px;
  }

  .token-entropy {
    font-size: 0.88rem;
  }

  .token-feedback-message {
    font-size: 0.85rem;
    padding: 10px;
  }
}

@media (max-width: 480px) {
  .token-card-content {
    padding: 16px 10px;
  }

  .token-card-content h1 {
    font-size: 1.3rem;
  }

  .token-intro {
    font-size: 0.85rem;
  }

  .token-settings {
    padding: 14px;
  }

  .token-settings input[type="text"],
  .token-settings select {
    font-size: 0.88rem;
  }

  .token-output {
    font-size: 0.85rem;
    padding: 16px;
    letter-spacing: 0.5px;
  }

  .token-btn-primary,
  .token-btn-secondary {
    padding: 11px 14px;
    font-size: 0.88rem;
  }
}